Zend Framework 1 to 2 Migration Guide by Bart McLeod & Bart McLeod

Zend Framework 1 to 2 Migration Guide by Bart McLeod & Bart McLeod

Author:Bart McLeod & Bart McLeod
Language: eng
Format: mobi, epub
ISBN: 9781940111216
Publisher: php[architect]
Published: 2015-10-01T04:00:00+00:00


Modifying the Layout

The layout is just another view model to which your action view model is added, like when you nest view models yourself. That means that if you retrieve the layout within your controller action or within your view template, you can do things like alter the layout template or insert additional view models into the layout. Getting the layout inside your controller action is straightforward:

$layout = $this->layout();

The ZF2 manual has excellent sections on the view layer, so I’m not going to repeat that information here. Please remember that if you have advanced needs, the manual is the place to read about the new and cool features available. Make sure you bookmark http://framework.zend.com/manual/current/en/modules/zend.view.quick-start.html.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.